package com.app.allwe.gui.countdown;

import cn.hutool.core.util.ObjectUtil;

import javax.swing.*;
import java.awt.*;

public class TimeLabel extends JLabel {

    private static TimeLabel timeLabel;

    private TimeLabel(String text, int horizontalAlignment) {
        super(text, horizontalAlignment);
    }

    public static TimeLabel getTimeLabel() {
        if (ObjectUtil.isNotNull(timeLabel)) {
            return timeLabel;
        }
        timeLabel = new TimeLabel(" ", JLabel.CENTER);
        Font serif = new Font("Serif", Font.BOLD, 300);
        timeLabel.setFont(serif);
        timeLabel.setForeground(new Color(0, 255, 255));
        return timeLabel;
    }
}
